//
//  AlarmCell.m
//  CarLifes
//
//  Created by yu on 2017/6/30.
//  Copyright © 2017年 jpas. All rights reserved.
//

#import "AlarmCell.h"

@implementation AlarmCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setModel:(AlarmModel *)model {
    _model = model;
    _deviceIdLabel.text = model.eqNo;
    _nameLabel.text = model.ownerName;
    _typeLabel.text = [model.dicProTitle containsString:@"围栏"]?model.lineName:model.dicProTitle;
    _timeLabel.text = model.createTime;
//    PPLog(@"model == %@",model.dicProTitle);
}

/*
-(void)layoutSubviews {
    
    for (UIControl *control in self.subviews){
        if ([control isMemberOfClass:NSClassFromString(@"UITableViewCellEditControl")]){
            for (UIView *view in control.subviews)
            {
                if ([view isKindOfClass: [UIImageView class]]) {
                    UIImageView *image=(UIImageView *)view;
                    if (self.selected) {
                        image.image = [UIImage imageNamed:@"check_all_select"];
                    } else {
                        image.image = [UIImage imageNamed:@"check_all_normal"];
                    }
                }
            }
        }
    }
    
    [super layoutSubviews];
}

- (void)setEditing:(BOOL)editing animated:(BOOL)animated {
    [super setEditing:editing animated:animated];
    for (UIControl *control in self.subviews) {
        if ([control isMemberOfClass:NSClassFromString(@"UITableViewCellEditControl")]) {
            for (UIView *view in control.subviews) {
                if ([view isKindOfClass: [UIImageView class]]) {
                    UIImageView *image = (UIImageView *)view;
                    if (!self.selected) {
                        image.image = [UIImage imageNamed:@"check_all_normal"];
                    }
                }
            }
        }
    }
}
*/
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
